package com.pyb.module.live;


import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;
import com.pyb.java.basemodule.BaseActivity;
import com.pyb.java.commonutil.constant.RouterActivityPath;
import com.pyb.java.commonutil.constant.RouterFragmentPath;

@Route(path = RouterActivityPath.Live.PAGER_VIDEO_LIVE)
public class LiveActivity extends BaseActivity {

    @Override
    protected int getLayoutId() {
        return R.layout.live_activity_live;
    }

    @Override
    protected void initView() {
        super.initView();
        Fragment fragment = (Fragment) ARouter.getInstance()
                .build(RouterFragmentPath.Live.PAGER_HOME_LIVE_VIDEO_ITEM_FM)
                .navigation();
        FragmentManager fragmentManager = getSupportFragmentManager();
        FragmentTransaction transaction = fragmentManager.beginTransaction();
        transaction.replace(R.id.fragmentContent, fragment).commitAllowingStateLoss();
    }
}